package com.avril.entity;

import com.avril.util.ValidationManager;

public class GoodsType {
	int typeId;
	String typeName;

	public GoodsType(int typeId, String typeName) {
		this.typeId = typeId;
		this.typeName = typeName;
	}

	public GoodsType() {
	}

	public int getTypeId() {
		return typeId;
	}

	public void setTypeId(int typeId) {
		this.typeId = typeId;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public Object getGoodsValue(int row, int col) {
		switch (col) {
		case 0:
			return ++row + "";
		case 1:
			return ValidationManager.changeNull(getTypeName());
		case 2:
			return ValidationManager.changeNull(getTypeId());
		}
		return null;
	}
}
